package org.fuys.etp.core.checker;

import org.fuys.etp.core.EtpPersistentConfig;
import org.fuys.etp.core.EtpRegistryConfig;
import org.fuys.etp.core.checker.impl.LevelAlertChecker;
import org.fuys.etp.core.checker.impl.SystemResourceChecker;
import org.fuys.etp.core.checker.impl.ThresholdChecker;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @projectName: fuys-etp-final
 * @package: org.fuys.etp.core.checker
 * @className: EtpUpdateCheckerChainConfig
 * @author: WangJing
 * @description: 检查链路配置
 * @date: 2025/2/19 9:49
 * @version: 1.0
 */
@Configuration
public class EtpUpdateCheckerChainConfig {

    @Resource
    private LevelAlertChecker levelAlertChecker;

    @Resource
    private SystemResourceChecker systemResourceChecker;

    @Resource
    private ThresholdChecker thresholdChecker;

    @Bean
    public EtpUpdateCheckerChain etpDefaultCheckerChain(){
        EtpUpdateCheckerChain defaultCheckerChain = new EtpUpdateCheckerChain();
        defaultCheckerChain.addChecker(thresholdChecker);
        defaultCheckerChain.addChecker(systemResourceChecker);
        defaultCheckerChain.addChecker(levelAlertChecker);
        return defaultCheckerChain;
    }
}
